/**
 * Created by qunxing.du on 2016/8/10.
 * Copyright 2016 汉威.智慧环保事业部 Limited.
 * All rights reserved.
 */
package com.hw.one.collect.zj.job;

import com.hw.one.collect.config.ConditionConfig;
import com.hw.one.collect.zj.config.ZjConfig;
import com.hw.one.collect.zj.data.ZjFiveMinDataService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import java.text.ParseException;
import java.util.List;

import javax.annotation.Resource;

/**
 * 中建7局5minJob
 */
@Component
public class ZjFiveMinJob extends ZjJob{

    @Resource
    private ZjFiveMinDataService zjFiveMinDataService;
    private Logger log = Logger.getLogger(this.getClass());
    @Override
    protected void start() {

        List<String> result = null;
		try {
		    String sncode = ConditionConfig.get("SNCODE", "zjfivemin");
		    log.info("zhengzhou sncode : " + sncode);
            result = zjFiveMinDataService.get(sncode);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
        log.info("zhengzhou push data = " + result);
        push(result);
    }
}
